﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/admin/AdminMaster.master" CodeFile="addWantMeet.aspx.cs" Inherits="delWantMeet" %>

<%@ Register Assembly="DotNetTextBox" Namespace="DotNetTextBox" TagPrefix="DNTB" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="AdminRight">
    <div class="rightHeader1">
        <div class="rightHLeft"><span class="rightHeaderTitle">当前位置</span></div>
        <div class="rightHMiddle2">
            <span>
                <a href="Default.aspx" class="moreRight" style="float: left;">首页</a> <span class="jian">></span>
                <a href="WantMeetAdm.aspx" class="moreRight" style="float: left;">招聘会信息</a><span class="jian">></span>
                <a href="addWantMeet.aspx" class="moreRight" style="float: left;">添加招聘会</a>
            </span>
        </div>
        <div class="rightHRight"></div>
    </div>
    <div style="margin-top: 10px; border: 1px solid #dddddd; width: 766px;">
        <asp:DetailsView ID="DetailsView1" runat="server"
            AutoGenerateRows="False" BackColor="White" BorderColor="#CC9966"
            BorderStyle="None" BorderWidth="1px" CellPadding="4" DataKeyNames="wmiid"
            DataSourceID="SqlDataSource2" Height="50px" HorizontalAlign="Left" GridLines="both"
            Width="722px" DefaultMode="Insert">
            <FooterStyle BackColor="#1f93e0" ForeColor="#333333" />
            <RowStyle BackColor="White" ForeColor="#333333" />
            <PagerStyle BackColor="#1f93e0" ForeColor="#FFFFFF" HorizontalAlign="Center" />
            <Fields>
                <asp:TemplateField HeaderText="招聘会名称" SortExpression="wmititle">
                    <InsertItemTemplate>
                        <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("wmititle") %>'></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
                            ControlToValidate="TextBox5" ErrorMessage="*"></asp:RequiredFieldValidator>
                    </InsertItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("wmititle") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="wmiadd" HeaderText="举 办 城 市" SortExpression="wmiadd" />
                <asp:TemplateField HeaderText="招聘会场地" SortExpression="wmid">
                    <EditItemTemplate>
                        <asp:DropDownList ID="DropDownList1" runat="server"
                            DataSourceID="SqlDataSource1" DataTextField="wmname" DataValueField="wmid"
                            SelectedValue='<%# Bind("wmid") %>'>
                        </asp:DropDownList>
                    </EditItemTemplate>
                    <InsertItemTemplate>
                        <asp:DropDownList ID="DropDownList2" runat="server"
                            DataSourceID="SqlDataSource1" DataTextField="wmname" DataValueField="wmid"
                            SelectedValue='<%# Bind("wmid") %>'>
                        </asp:DropDownList>
                    </InsertItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("wmname") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="详 细 信 息" SortExpression="wmiinfo">
                    <InsertItemTemplate>
                        <DNTB:WebEditor ID="WebEditor2" runat="server" AdjustSize="50"
                            BackColor="White" BorderColor="#DDDDDD" BorderWidth="0px"
                            CodeBackColor="#E8F4FF" CodeBorder="1px" CodeBorderColor="#6595D6"
                            CodeBorderStyle="Dotted" CodeTitle="以下是代码片段：" EditBorderColor="#CDCDD3"
                            EditHeight="210px" Height="280px" LeftAreaAlign="center" LeftAreaWidth="36%"
                            QuoteBackColor="#E8F4FF" QuoteBorder="1px" QuoteBorderColor="#6595D6"
                            QuoteBorderStyle="Dotted" QuoteTitle="以下是引用片段：" RightAreaAlign="center"
                            RightAreaWidth="64%" Shadow="False" StatusHeight="20px"
                            systemFolder="system_dntb/" Text='<%# Bind("wmiinfo") %>'
                            ToolBarColor="#EFEFEF" ToolBarHeight="50px" Width="555px" />
                    </InsertItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label3" runat="server" Text='<%# Bind("wmiinfo") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="举 办 日 期" SortExpression="wmidate">
                    <InsertItemTemplate>
                        <asp:TextBox ID="TextBox6" runat="server"
                            Text='<%# Bind("wmidate", "{0:d}") %>'></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
                            ControlToValidate="TextBox6" ErrorMessage="*"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server"
                            ControlToValidate="TextBox6" ErrorMessage="日期格式（yyyy/mm/dd）"
                            ValidationExpression="\d{4}/\d{2}/\d{2}"></asp:RegularExpressionValidator>
                    </InsertItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label4" runat="server" Text='<%# Bind("wmidate", "{0:d}") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ShowHeader="False">
                    <EditItemTemplate>
                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True"
                            CommandName="Update" Text="更新"></asp:LinkButton>
                        &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False"
                            CommandName="Cancel" Text="取消"></asp:LinkButton>
                    </EditItemTemplate>
                    <InsertItemTemplate>
                        <asp:LinkButton ID="LinkButton4" runat="server" CausesValidation="True"
                            CommandName="Insert" Text="添加"></asp:LinkButton>
                        &nbsp;<asp:LinkButton ID="LinkButton5" runat="server" CausesValidation="False"
                            Text="浏览" PostBackUrl="~/admin/WantMeetAdm.aspx"></asp:LinkButton>
                    </InsertItemTemplate>
                    <ItemTemplate>
                        <asp:LinkButton ID="LinkButton6" runat="server" CausesValidation="False"
                            CommandName="Edit" Text="编辑"></asp:LinkButton>
                        &nbsp;<asp:LinkButton ID="LinkButton7" runat="server" CausesValidation="False"
                            CommandName="New" Text="添加"></asp:LinkButton>
                        &nbsp;<asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="False"
                            CommandName="Delete" Text="删除"
                            OnClientClick="return confirm(&quot;确定删除？&quot;);"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Fields>
            <HeaderStyle BackColor="#1f93e0" Font-Bold="True" ForeColor="#FFFFFF" />
            <HeaderTemplate>
                添加招聘会
            </HeaderTemplate>
            <EditRowStyle BackColor="#FFFFFF" Font-Bold="True" ForeColor="#333333" />
        </asp:DetailsView>
    </div>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server"
        ConflictDetection="CompareAllValues"
        ConnectionString="<%$ ConnectionStrings:DB_CCXYRCConnectionString %>"
        DeleteCommand="DELETE FROM [WantMeetInfo] WHERE [wmiid] = @original_wmiid"
        InsertCommand="INSERT INTO [WantMeetInfo] ([wmititle], [wmiadd], [wmid], [wmiinfo], [wmidate]) VALUES (@wmititle, @wmiadd, @wmid, @wmiinfo, @wmidate)"
        OldValuesParameterFormatString="original_{0}"
        SelectCommand="SELECT WantMeetInfo.wmiid, WantMeetInfo.wmititle, WantMeetInfo.wmiadd, WantMeetInfo.wmid, WantMeetInfo.wmiinfo, WantMeetInfo.wmidate, WantMeetClass.wmname FROM WantMeetInfo INNER JOIN WantMeetClass ON WantMeetInfo.wmid = WantMeetClass.wmid"
        UpdateCommand="UPDATE [WantMeetInfo] SET [wmititle] = @wmititle, [wmiadd] = @wmiadd, [wmid] = @wmid, [wmiinfo] = @wmiinfo, [wmidate] = @wmidate WHERE [wmiid] = @original_wmiid">
        <DeleteParameters>
            <asp:Parameter Name="original_wmiid" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="wmititle" Type="String" />
            <asp:Parameter Name="wmiadd" Type="String" />
            <asp:Parameter Name="wmid" Type="Int32" />
            <asp:Parameter Name="wmiinfo" Type="String" />
            <asp:Parameter Name="wmidate" Type="DateTime" />
            <asp:Parameter Name="original_wmiid" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="wmititle" Type="String" />
            <asp:Parameter Name="wmiadd" Type="String" />
            <asp:Parameter Name="wmid" Type="Int32" />
            <asp:Parameter Name="wmiinfo" Type="String" />
            <asp:Parameter Name="wmidate" Type="DateTime" />
        </InsertParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConflictDetection="CompareAllValues"
        ConnectionString="<%$ ConnectionStrings:DB_CCXYRCConnectionString %>"
        DeleteCommand="DELETE FROM [WantMeetClass] WHERE [wmid] = @original_wmid AND [wmname] = @original_wmname"
        InsertCommand="INSERT INTO [WantMeetClass] ([wmname]) VALUES (@wmname)"
        OldValuesParameterFormatString="original_{0}"
        SelectCommand="SELECT * FROM [WantMeetClass]"
        UpdateCommand="UPDATE [WantMeetClass] SET [wmname] = @wmname WHERE [wmid] = @original_wmid AND [wmname] = @original_wmname">
        <DeleteParameters>
            <asp:Parameter Name="original_wmid" Type="Int32" />
            <asp:Parameter Name="original_wmname" Type="String" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="wmname" Type="String" />
            <asp:Parameter Name="original_wmid" Type="Int32" />
            <asp:Parameter Name="original_wmname" Type="String" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="wmname" Type="String" />
        </InsertParameters>
    </asp:SqlDataSource>

</asp:Content>
